import request from '@/config/axios'
/**
 * 分页查询客户
 */
export const pageQuery = (params) => {
  return request.get({ url: '/customer/customer/page-query', params })
}

/**
 * 新增客户
 */
export const create = (data) => {
  return request.post({ url: '/customer/customer/create', data })
}

/**
 * 更新客户
 */
export const update = (data) => {
  return request.put({ url: '/customer/customer/update', data })
}

/**
 * 放入回收站
 */
export const setRecycle = (ids) => {
  return request.post({ url: '/customer/customer/set-recycle?ids=' + ids })
}

/**
 * 从回收站恢复
 */
export const restore = (ids) => {
  return request.post({ url: '/customer/customer/restore?ids=' + ids })
}

/**
 * 彻底删除
 */
export const deleted = (ids) => {
  return request.delete({ url: '/customer/customer/deleted?ids=' + ids })
}

/**
 * 获取单个客户详情
 */
export const singleGetDetail = (id) => {
  return request.get({ url: '/customer/customer/single-get-detail?id=' + id })
}

/**
 * 放入公海
 */
export const putInPool = (data) => {
  return request.post({ url: '/customer/customer/put-in-pool', data })
}

/**
 * 新增跟进
 */
export const createFollow = (data) => {
  return request.post({ url: '/customer/customer/create-follow', data })
}

/**
 * 根据客户ID获取邮件联系人邮箱信息
 */
export const getMailInfoByCustomerIds = (data) => {
  return request.post({ url: '/customer/customer/get-mail-info-by-customer-ids', data })
}

/**
 * 客户移交
 */
export const transfer = (data) => {
  return request.post({ url: '/customer/customer/transfer', data })
}
